package org.lanqiao.webfm.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;
import java.io.Serializable;
import java.sql.*;
import java.lang.reflect.*;

import javacommon.base.*;
import javacommon.ijdbc.*;
import javacommon.util.*;
import javacommon.web.page.*;

import org.lanqiao.webfm.model.*;

import org.slf4j.*;

/**
*@Author zhengwei
**/
public class Userinfo extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	//date formats
	//columns START
	/**id**/
	private Long id;
	/**用户名**/
	private java.lang.String username;
	/**密码**/
	private java.lang.String pwd;
	/**电子邮件**/
	private java.lang.String email;
	/**真实姓名**/
	private java.lang.String realname;
	/**性别**/
	private Long gender;
	/**密保问题**/
	private java.lang.String question;
	/**密保答案**/
	private java.lang.String answer;
	/**电话号码**/
	private java.lang.String phone;
	/**个人主页**/
	private java.lang.String mypage;
	/**爱好**/
	private java.lang.String hobbies;
	/**自我介绍**/
	private java.lang.String selfintro;
	//columns END

	public Userinfo(){
	}

	public Userinfo(Long id){
		this.id = id;
	}

	public void setId(Long value) {
		this.id = value;
	}
	/**id**/
	public Long getId() {
		return this.id;
	}
	public void setUsername(java.lang.String value) {
		this.username = value;
	}
	/**用户名**/
	public java.lang.String getUsername() {
		return this.username;
	}
	public void setPwd(java.lang.String value) {
		this.pwd = value;
	}
	/**密码**/
	public java.lang.String getPwd() {
		return this.pwd;
	}
	public void setEmail(java.lang.String value) {
		this.email = value;
	}
	/**电子邮件**/
	public java.lang.String getEmail() {
		return this.email;
	}
	public void setRealname(java.lang.String value) {
		this.realname = value;
	}
	/**真实姓名**/
	public java.lang.String getRealname() {
		return this.realname;
	}
	public void setGender(Long value) {
		this.gender = value;
	}
	/**性别**/
	public Long getGender() {
		return this.gender;
	}
	public void setQuestion(java.lang.String value) {
		this.question = value;
	}
	/**密保问题**/
	public java.lang.String getQuestion() {
		return this.question;
	}
	public void setAnswer(java.lang.String value) {
		this.answer = value;
	}
	/**密保答案**/
	public java.lang.String getAnswer() {
		return this.answer;
	}
	public void setPhone(java.lang.String value) {
		this.phone = value;
	}
	/**电话号码**/
	public java.lang.String getPhone() {
		return this.phone;
	}
	public void setMypage(java.lang.String value) {
		this.mypage = value;
	}
	/**个人主页**/
	public java.lang.String getMypage() {
		return this.mypage;
	}
	public void setHobbies(java.lang.String value) {
		this.hobbies = value;
	}
	/**爱好**/
	public java.lang.String getHobbies() {
		return this.hobbies;
	}
	public void setSelfintro(java.lang.String value) {
		this.selfintro = value;
	}
	/**自我介绍**/
	public java.lang.String getSelfintro() {
		return this.selfintro;
	}
	
	private Set orderss = new HashSet(0);
	public void setOrderss(Set orders){
		this.orderss = orders;
	}
	
	public Set getOrderss() {
		return orderss;
	}
	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("Username",getUsername())
			.append("Pwd",getPwd())
			.append("Email",getEmail())
			.append("Realname",getRealname())
			.append("Gender",getGender())
			.append("Question",getQuestion())
			.append("Answer",getAnswer())
			.append("Phone",getPhone())
			.append("Mypage",getMypage())
			.append("Hobbies",getHobbies())
			.append("Selfintro",getSelfintro())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof Userinfo == false) return false;
		if(this == obj) return true;
		Userinfo other = (Userinfo)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

